<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>

    //局部变量
    //1.在函数中通过关键词var 声明的变量

    //作用域：代码生效的区域
    //局部变量只在函数内生效 =>   局部作用域(函数作用域)

    var a = 10
/*     var b = 8
    d = 888
    function add(a , b){
        var c = a + b;
        return c ;
    } */

    /* console.log(add(10 , 8) , d); */


    // function ss(a){
    //     console.log(a);
    //     a = 88;
    //     console.log(a);
    // }

    // ss(a);
    // console.log(a);

</script>
<!-- <script>
    console.log(a , b , d);
</script> -->
</html>